<div class="tableToolbar">
    <div class="coll-md-8" id="addInput">
        <div class="coll-md-2">
            <input type="text" class='search' placeholder="文章名称" ng-model="ctrlScope.itemsearch.name">
        </div>
        <div class="coll-md-2 scalenone" id="search2">
            <div class="coll-md-5 triangle">
                <select class="form-control" ng-model="ctrlScope.itemsearch.status">
                    <option value="" disabled hidden selected>状态</option>
                    <option value="1">显示</option>
                    <option value="0">隐藏</option>
                </select>
            </div>
            <div class="coll-md-5 triangle">
                <select class="form-control" ng-model="ctrlScope.itemsearch.siteId"> 
                    <option value="" disabled hidden selected>类别</option>
                    <option value="1">行业信息</option>
                    <option value="2">平台动态</option>
                    <option value="4">网站公告</option>
                </select>
            </div>
        </div>
        <div class="coll-md-4 scalenone"  id="searchdate" datahide>
            <div class="coll-md-5" >
                <p class="input-group">
                    <input type="text" class="search" placeholder="添加开始时间" uib-datepicker-popup="yyyy-MM-dd"
                           ng-model="ctrlScope.itemsearch.beginDateTimex" is-open="popup1.opened" datepicker-options="dateOptions"/>
						<span class="input-group-btn">
							            <button type="button" class="small-icon btn btn-default" ng-click="open1()"><i
                                                class="glyphicon glyphicon-calendar"></i></button>
							          </span>
                </p>
            </div>
            <div class="coll-md-5">
                <p class="input-group inline">
                    <input type="text" class="search" placeholder="添加结束时间" uib-datepicker-popup="yyyy-MM-dd"
                           ng-model="ctrlScope.itemsearch.endDateTimex" is-open="popup2.opened" datepicker-options="dateOptions"/>
						<span class="input-group-btn">
							            <button type="button" class="small-icon btn btn-default" ng-click="open2()"><i
                                                class="glyphicon glyphicon-calendar"></i></button>
							          </span>
                </p>
            </div>
        </div>
        <div class="coll-md-2">
            <input type="button" class="small-icon search2-icon" value="搜索" ng-click="search()">
            <input type="button" class="small-icon search2" value="搜索">
            <input type="button" class="small-icon reset-icon" reset-icon value="重置" ng-click="reset()">
            <input type="button" class="small-icon reset" value="重置">

            <div class="dropdown-menu-right">
                <input type="button" class="small-icon more-icon" value="更多" title='更多搜索项' id="more-icon" data-toggle="dropdown"
                       aria-haspopup="true" aria-expanded="false">
                <input type="button" class="small-icon more" value="更多">
                <ul class="dropdown-menu" style='margin-left:80px;' aria-labelledby="dropdownMenu2" more-search>
                    <li><a href="javascript:;">日期搜索</a></li>
                    <li><a href="javascript:;">类型状态搜索</a></li>
                </ul>
            </div>
        </div>
    </div>
    <div class="coll-md-2">
        <input type="button" class="bttn pos-right"  ng-click="addOrderModal()" value="新建">
    </div>
</div>
<table ui-table="orderParams">
    <thead>
    <tr>
        <th>编号</th>
        <th>类别</th>
        <th>文章名称</th>
        <th>状态</th>
        <th>来源</th>
        <!--<th>是否置顶</th>-->
        <!--<th>是否标注</th>-->
        <th>点击量</th>
        <th>排序</th>
        <th>添加时间</th>
        <th>操作</th>
    </tr>
    </thead>
    <tbody>
    <tr ng-repeat="item in orderParams.$rows">
        <td>{{item.id}}</td>
        <td>{{item.siteId | siteId}}</td>
        <td>{{item.name}}</td>
        <td>{{item.status |articleStatus}}</td>
        <td>{{item.articleSource}}</td>
        <!--<td>{{item.isTop | isnew}}</td>-->
        <!--<td>{{item.mark | isnew}}</td>-->
        <td>{{item.hits}}</td>
        <td>{{item.sort}}</td>
        <td>{{item.addtime | date:'yyyy-MM-dd HH:mm:ss'}}</td>
         <td>
         	<a ng-click="modifyModal(item.id)">编辑</a>
         	<a ng-click="delModal(item.id)">删除</a>
         </td>
    </tr>
    </tbody>
</table>
<modal title="新建" visible="addModal">
    <form class="form-horizontal">
        <div class="form-body">
            <div class="scrollArea">
                <div class="row">
                    <div class="col-md-6">
                        <div class="form-group">
                            <label class="control-label col-md-4">归属栏目：</label>
                            <div class="col-md-8 triangle-left">
                                <select class="form-control" ng-model="add.siteId" ui-select2="select2Options">
                                    <option value="">请选择</option>
                                    <option value="1">行业信息</option>
                                    <option value="2">平台动态</option>
                                    <option value="4">网站公告</option>
                                </select>
                            </div>
                        </div>
                    </div>
                    <div class="col-md-6">
                        <div class="form-group">
                            <label class="control-label col-md-4">文章标题：</label>
                            <div class="col-md-8">
                                <input type="text" class="form-control" ng-model="add.name" >
                            </div>
                        </div>
                    </div>
                    <div class="col-md-6">
                        <div class="form-group">
                            <label class="control-label col-md-4">状态：</label>
                            <div class="col-md-8 triangle-left">
                                <select class="form-control" ng-model="add.status" ui-select2="select2Options">
                                    <option value="">请选择</option>
                                    <option value="1">显示</option>
                                    <option value="0">隐藏</option>
                                </select>
                            </div>
                        </div>
                    </div>
                    <div class="col-md-6">
                        <div class="form-group">
                            <label class="control-label col-md-4">排序：</label>
                            <div class="col-md-8">
                                <input type="text" class="form-control" ng-model="add.sort" >
                            </div>
                        </div>
                    </div>
                    <div class="col-md-6">
                        <div class="form-group">
                            <label class="control-label col-md-4">来源：</label>
                            <div class="col-md-8">
                                <input type="text" class="form-control" ng-model="add.articleSource" >
                            </div>
                        </div>
                    </div>
                    <div class="col-md-12">
                        <div class="form-group">
                            <label class="control-label col-md-2">上传图片：</label>
                            <form name="uploadForm">
                                <div class="col-md-2" id="area1">
                                    <ul style="list-style-type:none; margin:0;width:800px;">
                                        <li ng-repeat="img in imgs" style="width:130px;float: left;display:inline;margin-right: 10px;position:relative">
                                            <img ng-src="{{ img }}" width="120" height="120" />
                                            <span class="icon-close img-close" style='position:absolute;right:-2px;top:-4px;' ng-click="removeImg($index)"></span>
                                        </li>
                                        <li ngf-select="uploadPic(file)" ng-model="file" name="file" ngf-pattern="'image/*'"
                                            ngf-accept="'image/*'" ngf-max-size="20MB"
                                            style="width:200px;float: left;display:inline">
                                            <img style="border:1px;cursor:pointer"
                                                 src="css/img/updatepic.png" width="120" height="120"  alt />
                                        </li>
                                    </ul>
                                </div>
                                <input type="hidden" ng-model="pics" name="pics" value="{{pics}}" id="pics"/>
                            </form>
                        </div>
                    </div>
                    <div class="col-md-12">
                        <div class="form-group">
                            <label class="control-label col-md-2">简介：</label>
                            <div class="col-md-10">
                                <textarea type="text" class="form-control" ng-model="add.summary" ></textarea>
                            </div>
                        </div>
                    </div>
                    <div class="col-md-12">
                        <div class="form-group">
                            <label class="control-label col-md-2">内容：</label>
                            <div class="col-md-10">
                                <div style="margin-bottom:1.25rem;height: 300px" class="ueditor" config="ueditor_config" ng-model="add.content" ></div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
            <div class="buttonArea col-md-12">
                <button type="submit" class="btn blue" ng-click="addBtn()">确认</button>
            </div>

        </div>
    </form>
</modal>
<modal title="编辑" visible="detailsModal">
    <form class="form-horizontal">
        <div class="form-body">
            <div class="scrollArea">
                <div class="row">
                    <div class="col-md-6">
                        <div class="form-group">
                            <label class="control-label col-md-4">归属栏目：</label>
                            <div class="col-md-8 triangle-left">
                                <select class="form-control" ng-model="list.siteId" ui-select2="select2Options">
                                    <option value="">请选择</option>
                                    <option value="1">行业信息</option>
                                    <option value="2">平台动态</option>
                                    <option value="4">网站公告</option>
                                </select>
                            </div>
                        </div>
                    </div>
                    <div class="col-md-6">
                        <div class="form-group">
                            <label class="control-label col-md-4">文章标题：</label>
                            <div class="col-md-8">
                                <input type="text" class="form-control" ng-model="list.name" >
                            </div>
                        </div>
                    </div>
                    <div class="col-md-6">
                        <div class="form-group">
                            <label class="control-label col-md-4">状态：</label>
                            <div class="col-md-8 triangle-left">
                                <select class="form-control" ng-model="list.status" ui-select2="select2Options">
                                    <option value="">请选择</option>
                                    <option value="1">显示</option>
                                    <option value="0">隐藏</option>
                                </select>
                            </div>
                        </div>
                    </div>
                    <div class="col-md-6">
                        <div class="form-group">
                            <label class="control-label col-md-4">排序：</label>
                            <div class="col-md-8">
                                <input type="text" class="form-control" ng-model="list.sort" >
                            </div>
                        </div>
                    </div>
                    <div class="col-md-6">
                        <div class="form-group">
                            <label class="control-label col-md-4">来源：</label>
                            <div class="col-md-8">
                                <input type="text" class="form-control" ng-model="list.articleSource" >
                            </div>
                        </div>
                    </div>
                    <div class="col-md-12">
                        <div class="form-group">
                            <label class="control-label col-md-2">上传图片：</label>
                            <form name="uploadForm">
                                <div class="col-md-2" id="area">
                                    <ul style="list-style-type:none; margin:0;width:800px;">
                                        <li ng-repeat="img in imgs" style="width:130px;float: left;display:inline;margin-right: 10px;position:relative">
                                            <img ng-src="{{ img }}" width="120" height="120" />
                                            <span class="icon-close img-close" style='position:absolute;right:-2px;top:-4px;' ng-click="removeImg($index)"></span>
                                        </li>
                                        <li ngf-select="uploadPic(file)" ng-model="file" name="file" ngf-pattern="'image/*'"
                                            ngf-accept="'image/*'" ngf-max-size="20MB"
                                            style="width:200px;float: left;display:inline">
                                            <img style="border:1px;cursor:pointer"
                                                 src="css/img/updatepic.png" width="120" height="120"  alt />
                                        </li>
                                    </ul>
                                </div>
                                <input type="hidden" ng-model="pics" name="pics" value="{{pics}}"/>
                            </form>
                        </div>
                    </div>
                    <div class="col-md-12">
                        <div class="form-group">
                            <label class="control-label col-md-2">简介：</label>
                            <div class="col-md-10">
                                <textarea type="text" class="form-control" ng-model="list.summary" ></textarea>
                            </div>
                        </div>
                    </div>
                    <div class="col-md-12">
                        <div class="form-group">
                            <label class="control-label col-md-2">内容：</label>
                            <div class="col-md-10">
                                <div style="margin-bottom:1.25rem;height: 300px" class="ueditor" config="ueditor_config" ng-model="list.content" ></div>
                            </div>
                        </div>
                    </div>
                    <input type="hidden" ng-model="list.id" />
                </div>
            </div>

            <div class="buttonArea col-md-12">
                <button type="submit" class="btn blue" ng-click="saveBtn()">确认</button>
            </div>
        </div>
    </form>
</modal>
